/**
 * @file ebex_chromosome.h
 *
 * @date Jan 12, 2010
 * @author seth
 *
 * @brief This file is part of EBEX State Estimator, created for the EBEX project
 *
 * This software is copyright (C) 2010 Columbia University
 *
 * EBEX State Estimator is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * EBEX State Estimator is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with EBEX State Estimator; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

#ifndef EBEX_CHROMOSOME_H
#define EBEX_CHROMOSOME_H

#include <stdbool.h>

#include <ebex_genetic.h>

bool ebex_genetic_chromosome_double_allocate(population_t *pop, organism_t *embryo, size_t m_numchromosomes, size_t m_length);
void ebex_genetic_chromosome_free(population_t *pop, organism_t *corpse);
size_t ebex_genetic_chromosome_double_copy(const population_t *m_pop, organism_t *m_src, organism_t *m_dst, const size_t m_chromosome);
char *ebex_genetic_chromosome_double_to_string(const population_t *m_pop, const organism_t *m_entity, char *m_dest, size_t *m_destlen, const size_t m_chromosome);

size_t ebex_genetic_chromosome_to_bytes(const population_t *m_pop, organism_t *m_entity, const uint8_t **m_dst);
void ebex_genetic_chromosome_from_bytes(const population_t *m_pop, organism_t *m_entity, uint8_t *m_bytestring);
bool ebex_genetic_chromosome_verify(population_t *m_pop, organism_t *m_entity);

bool ebex_genetic_chromosome_quaternion_allocate(population_t *pop, organism_t *embryo, size_t m_numchromosomes, size_t m_length);
char *ebex_genetic_chromosome_quaternion_to_string(const population_t *m_pop, const organism_t *m_entity, char *m_dest, size_t *m_destlen, const size_t m_chromosome);
size_t ebex_genetic_chromosome_quaternion_copy(const population_t *m_pop, organism_t *m_src, organism_t *m_dst, const size_t m_chromosome);

#endif /* EBEX_CHROMOSOME_H */

